import csv
import json
def load_test_data():
    with open('qd.csv','r',encoding='utf-8') as f:
        # 将每一行转换为字典
        return list(csv.DictReader(f))
#验证数据是否可以读取
all_data=load_test_data()
print(all_data)

# 读取json文件
def json_data():
    with open('js.json','r',encoding='utf-8') as f:
        return json.load(f)
print(json_data())

